package com.myprojects.common.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;

public class Resume {
    /**
    * @NotEmpty 用在集合类上面
    * @NotBlank 用在String上面
    * @NotNull 用在基本类型上
    */

    private Integer id;

    @NotNull(message = "上岗日期不能为空!")
    @DateTimeFormat(pattern = "yyyy-MM-dd") //设置输入的时间格式
    @JsonFormat(pattern="yyyy-MM-dd", timezone = "GMT+8")//设置输出的时间格式
    private Date employ_time;

    @NotNull(message = "文化程度不能为空!")
    private Integer literacy;

    @NotNull(message = "婚姻状况不能为空!")
    private Integer marry_status;

    @NotNull(message = "政治面貌不能为空!")
    private Integer political_outlook;

    @NotNull(message = "民族不能为空!")
    private Integer nation;

    @NotBlank(message = "地址不能为空!")
    private String address;

    @NotBlank(message = "电话不能为空!")
    private String phone;

    @Pattern(regexp = "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$",
            message = "邮箱格式错误!")
    private String email;

    private String others_contact;

    @NotBlank(message = "紧急联系人不能为空!")
    private String urgent_people;

    @NotBlank(message = "紧急联系电话不能为空!")
    private String urgent_phone;

    private String graduated_school;

    @DateTimeFormat(pattern = "yyyy-MM-dd") //设置输入的时间格式
    @JsonFormat(pattern="yyyy-MM-dd", timezone = "GMT+8")//设置输出的时间格式
    private Date graduated_time;

    private String major;

    private String remark;

    private String depart_reason;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Date getEmploy_time() {
        return employ_time;
    }

    public void setEmploy_time(Date employ_time) {
        this.employ_time = employ_time;
    }

    public Integer getLiteracy() {
        return literacy;
    }

    public void setLiteracy(Integer literacy) {
        this.literacy = literacy;
    }

    public Integer getMarry_status() {
        return marry_status;
    }

    public void setMarry_status(Integer marry_status) {
        this.marry_status = marry_status;
    }

    public Integer getPolitical_outlook() {
        return political_outlook;
    }

    public void setPolitical_outlook(Integer political_outlook) {
        this.political_outlook = political_outlook;
    }

    public Integer getNation() {
        return nation;
    }

    public void setNation(Integer nation) {
        this.nation = nation;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address == null ? null : address.trim();
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone == null ? null : phone.trim();
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email == null ? null : email.trim();
    }

    public String getOthers_contact() {
        return others_contact;
    }

    public void setOthers_contact(String others_contact) {
        this.others_contact = others_contact == null ? null : others_contact.trim();
    }

    public String getUrgent_people() {
        return urgent_people;
    }

    public void setUrgent_people(String urgent_people) {
        this.urgent_people = urgent_people == null ? null : urgent_people.trim();
    }

    public String getUrgent_phone() {
        return urgent_phone;
    }

    public void setUrgent_phone(String urgent_phone) {
        this.urgent_phone = urgent_phone == null ? null : urgent_phone.trim();
    }

    public String getGraduated_school() {
        return graduated_school;
    }

    public void setGraduated_school(String graduated_school) {
        this.graduated_school = graduated_school == null ? null : graduated_school.trim();
    }

    public Date getGraduated_time() {
        return graduated_time;
    }

    public void setGraduated_time(Date graduated_time) {
        this.graduated_time = graduated_time;
    }

    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major == null ? null : major.trim();
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark == null ? null : remark.trim();
    }

    public String getDepart_reason() {
        return depart_reason;
    }

    public void setDepart_reason(String depart_reason) {
        this.depart_reason = depart_reason == null ? null : depart_reason.trim();
    }

    @Override
    public String toString() {
        return "Resume{" +
                "id=" + id +
                ", employ_time=" + employ_time +
                ", literacy=" + literacy +
                ", marry_status=" + marry_status +
                ", political_outlook=" + political_outlook +
                ", nation=" + nation +
                ", address='" + address + '\'' +
                ", phone='" + phone + '\'' +
                ", email='" + email + '\'' +
                ", others_contact='" + others_contact + '\'' +
                ", urgent_people='" + urgent_people + '\'' +
                ", urgent_phone='" + urgent_phone + '\'' +
                ", graduated_school='" + graduated_school + '\'' +
                ", graduated_time=" + graduated_time +
                ", major='" + major + '\'' +
                ", remark='" + remark + '\'' +
                ", depart_reason='" + depart_reason + '\'' +
                '}';
    }
}